package com.qiye.livevideo.common;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * Created on 2019/4/30.
 * @author meishijun
 */
@Component
public class RetConstant implements InitializingBean {

    /**
     * 默认阿里云的账号身份标识keyId,当没有输入该身份标识时， 默认使用该标识。
     */
    public static final String   DEFAULT_ACCESS_KEY_ID = "LTAIafl9gvZoAKf6";
    /**
     * 定义播流的格式  0 为全部  1为rtmp  2为flv 3为m3u8
     */
    public static  final String FROMAT_FLOW_ALL = "0";
    public static  final String FROMAT_FLOW_RTMP = "1";
    public static  final String FROMAT_FLOW_FLV = "2";
    public static  final String FROMAT_FLOW_M3U8 = "3";


    /**
     * 接口调用次数限制
     */
    public static  final int API_COUNT =1000;

    /**
     * 服务器写入路径----该操作是将MultipartFile转化为File格式
     */
    @Value("${prop.upload-folder}")
    private String filePath;


    public static String FILE_PATH;

    @Override
    public void afterPropertiesSet() throws Exception {
        FILE_PATH = filePath;
    }
}
